package com.fsxgt.datax;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import com.alibaba.datax.common.element.ColumnCast;
import com.alibaba.datax.common.util.Configuration;

public class GlobalConfig {

	public static final InheritableThreadLocal<Map> contextHolder = new InheritableThreadLocal<>();
	
	public static void init(Configuration configuration) {
		

		ColumnCast columnCast=new ColumnCast(configuration);
		
		Map map=new ConcurrentHashMap();
		
		map.put("columnCast", columnCast);
		
		contextHolder.set(map);
		
	}
	
	public static ColumnCast getColumnCast() {
		return (ColumnCast) contextHolder.get().get("columnCast");
	}
}
